package com.example.administrator.newsapp.Fragments;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.example.administrator.newsapp.R;

public class SummaryFragment extends Fragment {
    private String title;

    public static SummaryFragment getTitle(String title){
        SummaryFragment sf=new SummaryFragment();
        sf.title=title;
        return sf;
    }

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view=inflater.inflate(R.layout.activity_summary,null);
        TextView tv=view.findViewById(R.id.tv_test);
        tv.setText(title);
        return view;
    }
}
